package com.robotserver.orders.service;

import com.jd.open.api.sdk.JdClient;
import com.jd.open.api.sdk.domain.kplunion.OrderService.request.query.OrderAgentReq;
import com.jd.open.api.sdk.domain.kplunion.OrderService.response.query.OrderAgentResp;
import com.jd.open.api.sdk.domain.kplunion.OrderService.response.query.OrderRowResp;
import com.robotserver.orders.entity.AlimmTokens;
import com.robotserver.orders.entity.JdTokens;
import com.robotserver.orders.param.JdOrderApiPullDto;
import com.robotserver.orders.vo.JdOrderTimeVO;
import com.robotserver.orders.vo.TbkOrderTimeVO;
import com.robotserver.orders.vo.biz.PageVO;
import com.taobao.api.TaobaoClient;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2019/11/8 11:24
 * @Description: 京东订单同步
 */
public interface JdOrderSyncService {
    void threadSyncOrder(List<JdTokens> jdTokens,List<JdOrderTimeVO> jdOrderTimeScope,JdClient client,String lockName);
    void threadLockSyncOrder(List<JdTokens> jdTokens,List<JdOrderTimeVO> jdOrderTimeScope, JdClient client,String lockName);
    void syncUnionUnitOrder(List<JdOrderTimeVO> jdOrderTimeScope,JdTokens token, JdClient client);
    void syncTimeUnitOrder(JdOrderTimeVO jdOrderTimeVO,JdTokens token,int pageNo,JdClient client);
    void ordersAdd(OrderRowResp[] OrderRowResps);

    //消费者-处理京东订单线程
    void threadSyncOrder_consumer(JdTokens jdTokens,List<JdOrderTimeVO> jdOrderTimeScope,JdClient client);

    //通过工具商AppKey来获取京东联盟订单
    void threadSyncOrder_byAppKey(List<JdOrderTimeVO> jdOrderTimeVOList, JdClient client, Integer downType);

    //通过工具商AppKey来获取京拥订单
    void threadSyncJyOrder_byAppKey(List<JdOrderTimeVO> jdOrderTimeVOList);

    //消费补拉订单redis
    void threadSyncJyOrder_byAppKey_consumer(JdOrderTimeVO jdOrderTimeVO, JdClient client, Integer downType);


    void ordersAdd_byAppKey(OrderAgentResp[] orderAgentResps);

    void ordersInfoAdd_byAppKey(OrderAgentResp[] orderAgentResps, OrderAgentReq orderAgentReq);

    //通过API直接下载，不入库
    PageVO apiPull_byAppKey(JdOrderApiPullDto jdOrderApiPullDto);

}
